1 /*
2  * This file is part of gtkD.
3  *
4  * gtkD is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU Lesser General Public License
6  * as published by the Free Software Foundation; either version 3
7  * of the License, or (at your option) any later version, with
8  * some exceptions, please read the COPYING file.
9  *
10  * gtkD is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13  * GNU Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public License
16  * along with gtkD; if not, write to the Free Software
17  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110, USA
18  */
19 
20 // generated automatically - do not change
21 // find conversion definition on APILookup.txt
22 // implement new conversion functionalities on the wrap.utils pakage
23 
24 
25 module gio.PowerProfileMonitorIF;
26 
27 private import gio.PowerProfileMonitorIF;
28 private import gio.c.functions;
29 public  import gio.c.types;
30 private import gobject.ObjectG;
31 
32 
33 /**
34  * #GPowerProfileMonitor makes it possible for applications as well as OS components
35  * to monitor system power profiles and act upon them. It currently only exports
36  * whether the system is in “Power Saver” mode (known as “Low Power” mode on
37  * some systems).
38  * 
39  * When in “Low Power” mode, it is recommended that applications:
40  * - disabling automatic downloads
41  * - reduce the rate of refresh from online sources such as calendar or
42  * email synchronisation
43  * - if the application has expensive visual effects, reduce them
44  * 
45  * It is also likely that OS components providing services to applications will
46  * lower their own background activity, for the sake of the system.
47  * 
48  * There are a variety of tools that exist for power consumption analysis, but those
49  * usually depend on the OS and hardware used. On Linux, one could use `upower` to
50  * monitor the battery discharge rate, `powertop` to check on the background activity
51  * or activity at all), `sysprof` to inspect CPU usage, and `intel_gpu_time` to
52  * profile GPU usage.
53  * 
54  * Don't forget to disconnect the #GPowerProfileMonitor::notify::power-saver-enabled
55  * signal, and unref the #GPowerProfileMonitor itself when exiting.
56  *
57  * Since: 2.70
58  */
59 public interface PowerProfileMonitorIF{
60 	/** Get the main Gtk struct */
61 	public GPowerProfileMonitor* getPowerProfileMonitorStruct(bool transferOwnership = false);
62 
63 	/** the main Gtk struct as a void* */
64 	protected void* getStruct();
65 
66 
67 	/** */
68 	public static GType getType()
69 	{
70 		return g_power_profile_monitor_get_type();
71 	}
72 
73 	/**
74 	 * Gets a reference to the default #GPowerProfileMonitor for the system.
75 	 *
76 	 * Returns: a new reference to the default #GPowerProfileMonitor
77 	 *
78 	 * Since: 2.70
79 	 */
80 	public static PowerProfileMonitorIF dupDefault()
81 	{
82 		auto __p = g_power_profile_monitor_dup_default();
83 
84 		if(__p is null)
85 		{
86 			return null;
87 		}
88 
89 		return ObjectG.getDObject!(PowerProfileMonitorIF)(cast(GPowerProfileMonitor*) __p, true);
90 	}
91 
92 	/**
93 	 * Gets whether the system is in “Power Saver” mode.
94 	 *
95 	 * You are expected to listen to the
96 	 * #GPowerProfileMonitor::notify::power-saver-enabled signal to know when the profile has
97 	 * changed.
98 	 *
99 	 * Returns: Whether the system is in “Power Saver” mode.
100 	 *
101 	 * Since: 2.70
102 	 */
103 	public bool getPowerSaverEnabled();
104 }